1. Field of the Invention
The present invention relates to a system for managing a storage medium which is to be used as an external storage medium for a computer system.
2. Description of the Prior Art
In the management of a storage medium in a general purpose operating system (hereinafter referred as merely "OS"), it is usual to divide the address space into logical blocks of a fixed size and to use serial numbers (Logical Block Number: LBN) assigned to these logical blocks. Usually, these logical blocks correspond by one to one to physical blocks which are obtained by dividing the storage medium into the same size as that of the logical blocks, under the management of the basic input/output system (hereinafter abbreviated as "BIOS") of the OS. The size of a physical block is n times (n is an integer of one or more) of a physical sector which is the smallest unit of the storage medium recorded or reproduced by a drive unit, and the physical block is composed of consecutive "n" physical sectors. In the case that an optical disk is used as a storage medium, the size of a logical block is about 2 to 8 KB, and the size of a physical sector is about 512 B to 1 KB.
Therefore, the recording and reproduction processes between the OS and a storage medium is executed by the unit of this logical block size. That is, a memory drive unit can conduct the recording and reproduction processes by the unit of "n" physical sectors.
However, this management system using the logical block as the unit has a problem that some portions of a storage medium become useless in the case where the size of data to be recorded is smaller than that of the logical block. More specifically, even when the size of data to be recorded is several hundreds of bytes, which can be stored in one physical sector, the OS can manage the recording or reproduction process of the data only by the unit of a logical block, using the LBN. Hence, the not-used space in the logical block causes futile physical sectors, resulting in an inferior utilization ratio of the storage medium. In a write-once type optical disk, an area which has been used once cannot be used again. When an area of a write-once type optical disk has been used once as such a futile physical sector, therefore, it is impossible to use this physical sector again. When a write-once type optical disk is used as a storage medium, therefore, the utilization ratio of the storage medium is remarkably reduced.
This problem in the prior art will be described in more detail by exemplifying the following two cases.
(1) Recording of management data in an update process in a general purpose OS
In the file system of a general purpose OS, data stored in a storage medium are classified into ordinary data files and management data. For example, in an OS wherein directories are used for conducting the hierarchical management of files, a directory file (hereinafter referred as "DF") to be managed includes identifiers and/or recording positions in a storage medium of files to be stored in the corresponding directory. Such a DF is mixedly recorded together with data files, and controlled by the unit of a logical block.
Therefore, a DF the size of which is usually several hundreds of bytes is recorded by the unit of a logical block ("n" physical sectors) the size of which is several kilo bytes, resulting in that futile physical sectors are recorded.
(2) Recording of different kinds of data produced in a series of processes wherein a process of reproducing each kind of data occurs separately.
When data of a first kind and data of a second kind both of which are small in size are successively produced and a recording process of each data is executed on each data production as shown in a flow chart of FIG. 17, the data of the first kind and those of the second kind are separately recorded in a different logical block of a storage medium, because a reproduction process for each kind of the data is executed at separate timings. Namely, each of the first and second kinds of data must be recorded in a different logical block. Even when the data of the first and second kinds are very small in size (e.g., several hundreds bytes), each kinds of data are to be recorded by the unit of a logical block, resulting in that futile physical sectors are recorded.
An example of such a process is a record process in which key word data (the first data) and document storage position data (the second data) are recorded in a document file system. The size of either of the data is considerably small in comparison with the size of a logical block. However, the process for reading the key word data and that for reading the document storage position data are separately executed, i.e., the former process is executed when searching for each document, and the latter process is done when displaying the result of search with reference to the storage position of the searched document.
Another example is the process of updating management data in a control system in which the standard format for a 5" read-only optical disk (CD-ROM) can be used for a write-once type optical disk (for example, Nikkei Electronics, No. 452, Jul. 25, 1988). In this updation process, an updated directory file corresponds to data of the first kind, and the history data of a path table which is a batch management table of directory files corresponds to data of the second kind. The process of reading the history data and that of reading an updated directory file are carried out separately, namely, the former is executed in the initialization when replacing a disk, and the latter is executed on a file access. Moreover, in comparison with the size of logical blocks (in this case, 2 KB), the size of the history data and that of the updated directory file are considerably small, i.e., the history data is only about 100 bytes and the updated directory file is about several hundreds of bytes.